package com.example.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.entity.OrganizationMember;

public interface OrganizationMemberService extends IService<OrganizationMember> {
    
    // 申请加入组织
    boolean joinOrganization(OrganizationMember member);
    
    // 审核成员申请
    boolean reviewMember(Long id, Integer status, String rejectReason, Long reviewerId);
    
    // 更新成员信息
    boolean updateMember(OrganizationMember member);
    
    // 更新成员角色
    boolean updateMemberRole(Long id, Integer role);
    
    // 禁用/启用成员
    boolean toggleMemberStatus(Long id, boolean enable);
    
    // 移除成员
    boolean removeMember(Long id);
    
    // 批量移除成员
    boolean batchRemoveMembers(Long[] ids);
    
    // 分页查询成员列表
    Page<OrganizationMember> getMemberList(Integer pageNum, Integer pageSize, Long organizationId, 
            Long volunteerId, Integer role, Integer status);
    
    // 获取成员详情
    OrganizationMember getMemberInfo(Long id);
    
    // 检查是否为组织成员
    boolean isMember(Long organizationId, Long volunteerId);
    
    // 检查是否为组织管理员
    boolean isAdmin(Long organizationId, Long volunteerId);
} 